]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
helpers: Destroy GjsContext before exit
authorPhilip Chimento <philip@endlessm.com>
Wed, 30 Nov 2016 00:24:44 +0000 (16:24 -0800)
committerPhilip Chimento <philip@endlessm.com>
Wed, 7 Dec 2016 19:34:15 +0000 (11:34 -0800)
This will be required in the upcoming version of GJS.

https://bugzilla.gnome.org/show_bug.cgi?id=775374

src/gnome-shell-extension-prefs.c
src/gnome-shell-portal-helper.c

index 967e6156f6cb72b38041185a525191d7a03a0641..5876121ef6f79a8ab25f7b1af59dd39ffde1e3c6 100644 (file)
@@ -30,6 +30,7 @@ main (int argc, char *argv[])
     {
       g_message("Failed to defined ARGV: %s", error->message);
       g_error_free (error);
+      g_object_unref (context);
 
       return 1;
     }
@@ -43,9 +44,11 @@ main (int argc, char *argv[])
     {
       g_message ("Execution of main.js threw exception: %s", error->message);
       g_error_free (error);
+      g_object_unref (context);
 
       return status;
     }
 
+  g_object_unref (context);
   return 0;
 }
index 4087f8752a1ef3a68d9067185e9dd89c11bf2d9f..94eeecb389b47e27ac78d45a9492976a0083fb5b 100644 (file)
@@ -30,6 +30,7 @@ main (int argc, char *argv[])
     {
       g_message("Failed to define ARGV: %s", error->message);
       g_error_free (error);
+      g_object_unref (context);
 
       return 1;
     }
@@ -44,9 +45,11 @@ main (int argc, char *argv[])
     {
       g_message ("Execution of main.js threw exception: %s", error->message);
       g_error_free (error);
+      g_object_unref (context);
 
       return status;
     }
 
+  g_object_unref (context);
   return 0;
 }